package com.ethink.component.warehouse.enums;

/**
 * @Description: 易通宝平台（青岛仓）接口名
 * @Author: lzy
 * @Date: Created in 2022/11/3 9:53
 * ModifiedBy:
 * Version:
 */
public enum EtonbaoServiceNameEnum {
    /**
     * 入库单创建
     */
    ENTRYORDER_CREATE("entryorder.create"),
    /**
     * 入库单确认
     */
    ENTRYORDER_CONFIRM("entryorder.confirm"),
    /**
     * 出库单创建
     */
    STOCKOUT_CREATE("stockout.create"),
    /**
     * 出库单确认
     */
    STOCKOUT_CONFIRM("stockout.confirm"),
    /**
     * 单据取消
     */
    ORDER_CANCEL("order.cancel"),
    /**
     * WMS实物库存查询
     */
    INVENTORY_QUERY_WMS("inventory.query.wms"),
    ;

    private String code;

    EtonbaoServiceNameEnum(String name) {
        this.code = name;
    }

    public String getCode() { return this.code; }

    /**
     * 枚举Code值获取枚举
     *
     * @param code
     * @return
     */
    public static EtonbaoServiceNameEnum valueOfCode(String code) {
        for (EtonbaoServiceNameEnum value : EtonbaoServiceNameEnum.values()) {
            if (value.getCode().equals(code)) {
                return value;
            }
        }
        return null;
    }
}
